<?php

class CampaignController extends St_Controller_Action {
        
    public function sponsorAction() {
        if (!$this->auth->hasIdentity() && (St_Registry::getActionName() != "logout") && (St_Registry::getActionName() != "deny")) {
            $this->_redirect("access/deny");
        }        
    }
    
    public function newAction(){
        if (!$this->auth->hasIdentity() && (St_Registry::getActionName() != "logout") && (St_Registry::getActionName() != "deny")) {
            $this->_redirect("access/deny");
        }
        $db = St_Registry::getDB();
        $select = $db->select()
                ->from(array('u' => 'category'))
                ->order('categoryTitle');
        $categories = $db->fetchAll($select);
        $this->view->categories = $categories;
    }

}

